#!/usr/bin/env bash
BASE=/opt/ehrmb
echo "=========cd $BASE========"
cd $BASE

echo "=========rm *.log======="
echo rm *.log

echo "=========kill -9 $(ps -ef|grep front.war|gawk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ')====="
kill -9 $(ps -ef|grep HR-site.jar|gawk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ')

echo "=========nohup java -Xms256m -Xmx1024m -jar $SOURCE/front/front.war======="
nohup java -Xms256m -Xmx1024m -jar $BASE/HR-site.jar --spring.profiles.active=prod > nohup.log &

echo "=======Finished========"
